module <%= controller_class_name %>Helper
<% for attribute in attributes -%>
  def <%= attribute.name %>_value(f = nil) 
    if f
       f.<%= attribute.field_type %> :<%= attribute.name %> 
    else
       h @<%= singular_name %>.<%= attribute.name %> 
    end

  end
<% end -%>
end
